package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 3:08:52 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbTipoNotif generated by hbm2java
 */
@Entity
@Table(name = "TB_TIPO_NOTIF", schema = "CATALOGOS")
public class TbTipoNotif implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String ctipoNotif;
	private String dtipoNotif;
	private String cusuario;
	private Date fhingreso;
	private Set<TbTipoNotiDet> tbTipoNotiDets = new HashSet<TbTipoNotiDet>(0);

	public TbTipoNotif() {
	}

	public TbTipoNotif(String ctipoNotif, String dtipoNotif, String cusuario,
			Date fhingreso) {
		this.ctipoNotif = ctipoNotif;
		this.dtipoNotif = dtipoNotif;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
	}

	public TbTipoNotif(String ctipoNotif, String dtipoNotif, String cusuario,
			Date fhingreso, Set<TbTipoNotiDet> tbTipoNotiDets) {
		this.ctipoNotif = ctipoNotif;
		this.dtipoNotif = dtipoNotif;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.tbTipoNotiDets = tbTipoNotiDets;
	}

	@Id
	@Column(name = "C_TIPO_NOTIF", unique = true, nullable = false, length = 1)
	public String getCtipoNotif() {
		return this.ctipoNotif;
	}

	public void setCtipoNotif(String ctipoNotif) {
		this.ctipoNotif = ctipoNotif;
	}

	@Column(name = "D_TIPO_NOTIF", nullable = false, length = 20)
	public String getDtipoNotif() {
		return this.dtipoNotif;
	}

	public void setDtipoNotif(String dtipoNotif) {
		this.dtipoNotif = dtipoNotif;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@OneToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE}, fetch = FetchType.LAZY, mappedBy = "tbTipoNotif")
	public Set<TbTipoNotiDet> getTbTipoNotiDets() {
		return this.tbTipoNotiDets;
	}

	public void setTbTipoNotiDets(Set<TbTipoNotiDet> tbTipoNotiDets) {
		this.tbTipoNotiDets = tbTipoNotiDets;
	}

}
